<!DOCTYPE html>
<html>
<head>
  <title></title>
  <style type="text/css">
      #app-div{
        overflow: hidden;
        width:100%;
      }
      body{
          background-color: #F1F5F8;
      }
      #root{
        min-height: 100%;
        overflow:auto;
        float: left;
        padding-top: 50px;
        background:#fff; 
      }
      #app{
        height:100%;
        overflow: auto;
        padding-top:50px;
        float: left;
        box-sizing: border-box;
      }
  </style>
  <link rel="icon" type="image/x-icon" href="./static/lib/img/title-icon.png" />
  <!-- <link rel="stylesheet" type="text/css" href="https://cmcconsole.chinamcloud.com/cmc/cmc_header_left.css">
  <link rel="stylesheet" type="text/css" href="https://cmcconsole.chinamcloud.com/cmc/cmc_submenu.css"> -->
</head>
<body >
  <div id='root'></div>
  <div id="app"></div>

<!-- <script type="text/javascript" src="https://cmcconsole.chinamcloud.com/cmc/cmc_header_left.js"></script>
<script type="text/javascript" src="https://cmcconsole.chinamcloud.com/cmc/cmc_submenu.js"></script>


<script src="https://cdn.bootcss.com/clipboard.js/2.0.0/clipboard.min.js"></script>
<script src="http://g.alicdn.com/sj/dpl/1.5.1/js/sui.min.js"></script> -->
<script src="https://cdn.bootcss.com/jquery/1.7.2/jquery.min.js"></script>
<script src="./static/lib/js/config.js"></script>
<script type="text/javascript">
 //创建link标签
 function addCssByLink(url) {
      var doc = document;
      var link = doc.createElement("link");
      link.setAttribute("rel", "stylesheet");
      link.setAttribute("type", "text/css");
      link.setAttribute("href", url);

      var heads = doc.getElementsByTagName("head");
      if (heads.length)
        heads[0].appendChild(link);
      else
        doc.documentElement.appendChild(link);
    }

 //创建script标签
  function addJsByScript(url) {
    var script = document.createElement("script");
    script.setAttribute("type", "text/javascript");
    script.setAttribute("src", url);
    var heads = document.getElementsByTagName("head");
    if (heads.length)
      heads[0].appendChild(script);
    else
      document.documentElement.appendChild(script);
  }
  
    $.ajax({
        type: "get",
        url: window.config.API_ROOT + 'login-status',
        data: "",
        async: false,
        success: function(data){
          addCssByLink('https://cmcconsole.chinamcloud.com/cmc/cmc_header_left.css');
          addCssByLink('https://cmcconsole.chinamcloud.com/cmc/cmc_submenu.css');
          addJsByScript('https://cmcconsole.chinamcloud.com/cmc/cmc_header_left.js');
          addJsByScript('https://cmcconsole.chinamcloud.com/cmc/cmc_submenu.js');
          addJsByScript('https://cdn.bootcss.com/clipboard.js/2.0.0/clipboard.min.js');
          addJsByScript('http://g.alicdn.com/sj/dpl/1.5.1/js/sui.min.js');      
        },
        error:function(xhr,textStatus){
          if(xhr.status!=0){
            window.location.href=window.config.LOGIN_ROOT;
          }
        },
      });
          
      window.onload=function(){
        var menu = window.cmc_leftmenu(document.getElementById('root'), {
            productId: 'ysmf',
            title: '魔方互动',
        });  
      }
 

</script>
</body>
</html>